from requests_html import HTMLSession

session = HTMLSession()
url = "https://search.51job.com/list/190200,000000,0000,00,9,99,%25E5%25A4%25A7%25E6%2595%25B0%25E6%258D%25AE,2,1.html";

headers = {'Host': 'search.51job.com',
           'Upgrade-Insecure-Requests': '1',
           'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'}
import requests

html = requests.get(url,headers = headers,timeout = 10)
# requests.session()

page = html.content.decode("gbk")

import re

pagenum = re.search(r'<span class="td">共(\d*)页，到第</span>',page,re.S)
print(pagenum.group(1))

